This lab (Class 5 Lab 4) features raster data within QGIS. The input datasets will be both vector based on the same theme - gridded world population. This data is very similar to the data used for the first map in assignment 5. Here the focus will be two-fold:
Raster Symbolization
Raster Calculator
To start, download the lab data:
There are two raster datasets in the lab data part I. They originate as the Gridded Population of the World V4 (GPW) based on two temporal variables - 2010 and 2020. In this lab, the difference between the two datasets will be calculated and then mapped thematically as population change.
Gridded GPW Interface
Import Rasters to QGIS
Value Tool Plugin
Value Tool Plugin
In this lab, this difference between 2010 and 2020 across both raster extents will be derived and mapped. Prior to calculating difference, symbolization will be explored.
Within the 2010 layer, navigate to layer properties > symbology. Choose Singleband pseudocolor renderer. Expand the Min / Max Value Settings and choose the Cumulative count cut option. The standard data range is set from 2% to 98% of the data values, meaning that the outliers will not be used to set the minimum and maximum values, resulting in a much more representative visualization. Typically this makes sense for visualization; however, when conducting analysis, keep in mind the actual data spread is important to the calculations.
Continuous Value Symbolization
Continuous Value Symbolization Result
Next, Copy the applied style in the 2010 layer, and apply Paste to the 2020 layer. Toogle the two layers ON/OFF; note the population gains at/near high population urban geographies:
Copy:
Copy Style
Paste Style
Symbolization Result
Raster Calculator Interface
Within the Raster Calculator, bands are named after the raster name followed by @ and band number. Since each of our rasters have only 1 band, you will the names with @1 appended to the layer name. The calculation that will be utilized to derive change is simple raster math - in this case subtraction formatted as follows:
"gpw_v4_population_count_rev11_2020_2pt5_min@1" - "gpw_v4_population_count_rev11_2010_2pt5_min@1"
Output the layer as population_change_2010_2020.tif:
Raster Calculator
Visualize the results not with continuous values per se, but discrete values. Here we give a name/meaning to the colors beyond their quantitative position within the dataset. Four discrete values will be represented as unique colors, breaking the broad theme of population change into meaningful categories:
-10010010001000000Within the population_change_2010_2020.tif layer , navigate to layer properties > symbology. Choose Singleband pseudocolor renderer. Select the Interpolation method as Discrete. Remove any values using the minus button (red minus sign):
Discrete Symbolization Application
-100 and color to dark blue, then selecting Apply:Discrete Breaks Applied
Note: only those values that fit the class of
-100are shown on the map canvas.
Discrete Breaks Applied
Result
Explore Results
While the previous lab utilized a continuous raster with global coverage, rasters with finer resolutions suitable to larger scale mapping are often organized as tile series. Tiles are typically merged into one layer for further analysis.
Raster Tiles prior to merge process
Built virtual raster processing tool is utilized to merge tiles:Build Virtual Raster
Tool Input using highest value and bilinear approach
Clip raster by mask layer processing tool:Clip Raster
Input and Mask Layer
Clipped Result
Pyramids are used to improve display performance. They are a downsampled version of the original raster dataset and can contain many downsampled layers.
cubic method is appropriate for continuous values like DEM data:Cubic Resampling for Raster Pyramids
Pyramids NOT applied prior to processing
Pyramids successfully applied
.ovr file is created adjacent to the main raster layer; this is where the pyramid data is held ‘externally’. This can be checked in Properties as More information:Applied Pyramids will appear under More information